/*
 * @Copyright: (C) 2019 Zhang Rida. All rights reserved.
 *
 * @Author: Zhang Rida
 * @Email: 215154317@qq.com
 * @FilePath: /WEILA_SDK_MODULE/src/wlsdk/src/keepalive_module.h
 * @Date: 2021-02-27 17:08:35
 * @Description:
 *
 * @LastEditors: Zhang Rida
 * @LastEditTime: 2021-12-21 12:24:00
 */
#ifndef _HEARTBEAT_MODULE_H
#define _HEARTBEAT_MODULE_H

#include "wlsdk_define.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef enum {
    KEEPALIVE_MSG_SET_NETWORK = 0,
    KEEPALIVE_MSG_SET_RESOURCE_VERSION,
    KEEPALIVE_MSG_CONNECTED,
    KEEPALIVE_MSG_DISCONNECTED,
    KEEPALIVE_MSG_SEND_HEARTBEAT,
    KEEPALIVE_MSG_SEND_HEARTBEAT_RESPONSE,
    KEEPALIVE_MSG_CHECK_VERSION,
    KEEPALIVE_MSG_ALARM_POWER,
    KEEPALIVE_MSG_BATTERY_UPDATE,
    KEEPALIVE_MSG_REPORT_REBOOT,
    KEEPALIVE_MSG_REPORT_RESET_MODEM,
    KEEPALIVE_MSG_SET_HEARTBEAT_INTERVAL,
    KEEPALIVE_MSG_SET_MEMORY_THRESHOLD,
    KEEPALIVE_MSG_SET_MEMORY_ALARM_REBOOT_HOUR,
    KEEPALIVE_MSG_SET_OTA_STATUS,
} keepalive_module_msgid;

typedef struct __keepalive_network {
    wl_uint32 simid;
    wl_uint32 pdpid;
    wl_uint32 state;
} keepalive_network;

typedef struct __keepalive_resource_version {
    wl_char   version[MAX_VERSION_LEN];
    wl_uint32 version_number;
} keepalive_resource_version;

wl_int32 keepalive_module_init(wlsdk_message_callback callback);
wl_int32 keepalive_module_end(void);

#ifdef __cplusplus
}
#endif
#endif
